package com.hqyj.ctxp.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @className: Orders
 * @description: TODO 类描述
 * @author: mmm
 * @date: 2022/12/8
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("orders")
public class Orders {

    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    @TableField("order_no")
    private Long orderNo;

    @TableField("user_no")
    private Integer userNo;

    @TableField("total_price")
    private Double totalPrice;

    @TableField("order_status")
    private Integer orderStatus;

    @TableField("pay_status")
    private Integer payStatus;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateTime;

    @TableField(exist = false)
    private List<OrderItem> orderItems;
}
